<?php
using("Db_Common_SqlException");

/**
 * PDO Sql Exception
 * 
 * @author Patrick J. Mizer <patrick.mizer@gmail.com>
 * @author Alex Schearer
 * @package junction.db.pdo
 */
class Db_Pdo_SqlException extends Db_Common_SqlException 
{   
	/**
	 * Throw a new exception with the passed message and query
	 *
	 * @param String $message
	 * @param String $query
	 */
	public function __construct($pdoConn, $query) 
	{
		$errorArray = $pdoConn->errorInfo();
		parent::__construct($errorArray[0] . ' (' . $errorArray[1] . '): ' . $errorArray[2]);
		$this->_query = $query;
	}
}    
?>